<?php
include 'vendor/autoload.php';

use function Amp\ParallelFunctions\parallelMap;
use function Amp\Promise\wait;

$responses = wait(parallelMap([
    'http://localhost/demo.php?index=100',
	'http://localhost/demo.php?index=200',
	'http://localhost/demo.php?index=300',
	'http://localhost/demo.php?index=400',
	'http://localhost/demo.php?index=500',
	'http://localhost/demo.php?index=600',
	'http://localhost/demo.php?index=700',
	'http://localhost/demo.php?index=800',
	'http://localhost/demo.php?index=900',
	'http://localhost/demo.php?index=1000',
], function ($url) {
    return file_get_contents($url);
}));

var_dump($responses);